<?php

namespace App\Models;

use App\Traits\WorkerMysqlConnect;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class jiqiren_content extends Model
{
    use HasFactory;
    use WorkerMysqlConnect;

    protected $table = 'jiqiren_content';

    public static function getContentById($pid,$select='*')
    {
        return self::query()->select($select)->where(compact('pid'))->get();
    }

    public static function getAllContent($select='*')
    {
        return self::connectWorker()->select($select)->query();
    }
}
